package main

import (
	"fmt"
	"gadmin/conf"
	"gadmin/router"

	"github.com/gin-gonic/gin"
)

func main() {
	if conf.Conf.Http.Debug {
		gin.SetMode(gin.DebugMode)
	} else {
		gin.SetMode(gin.ReleaseMode)
	}

	r := router.BuildRouter()
	r.Run(fmt.Sprintf("%s:%d", conf.Conf.Http.Host, conf.Conf.Http.Port))
}
